
export interface StateResp {

    program_state: number,
    error_code: number,
    robot_mode: number,
    
    jt_cur_pos0: number,
    jt_cur_pos1: number,
    jt_cur_pos2: number,
    jt_cur_pos3: number,
    jt_cur_pos4: number,
    jt_cur_pos5: number,

    tl_cur_pos0: number,
    tl_cur_pos1: number,
    tl_cur_pos2: number,
    tl_cur_pos3: number,
    tl_cur_pos4: number,
    tl_cur_pos5: number,
    
    tool_num: number,

    jt_cur_tor0: number,
    jt_cur_tor1: number,
    jt_cur_tor2: number,
    jt_cur_tor3: number,
    jt_cur_tor4: number,
    jt_cur_tor5: number,

    program_name: string,
    prog_total_line: number,
    prog_cur_line: number,

    cl_dgt_output_h: number,
    cl_dgt_output_l: number,
    tl_dgt_output_l: number,
    cl_dgt_input_h: number,
    cl_dgt_input_l: number,
    tl_dgt_input_l: number,

    ft_data0: number,
    ft_data1: number,
    ft_data2: number,
    ft_data3: number,
    ft_data4: number,
    ft_data5: number,

    ft_act_status: number,

    emergency_stop: number,
    robot_motion_done: number,
    gripper_motion_done: number,
}

export function stateDefault(): StateResp {
    return {
        program_state: 0,
        error_code: 0,
        robot_mode: 0,

        jt_cur_pos0: 0,
        jt_cur_pos1: 0,
        jt_cur_pos2: 0,
        jt_cur_pos3: 0,
        jt_cur_pos4: 0,
        jt_cur_pos5: 0,

        tl_cur_pos0: 0,
        tl_cur_pos1: 0,
        tl_cur_pos2: 0,
        tl_cur_pos3: 0,
        tl_cur_pos4: 0,
        tl_cur_pos5: 0,

        tool_num: 0,
        
        jt_cur_tor0: 0,
        jt_cur_tor1: 0,
        jt_cur_tor2: 0,
        jt_cur_tor3: 0,
        jt_cur_tor4: 0,
        jt_cur_tor5: 0,

        program_name: '',
        prog_cur_line: 0,
        prog_total_line: 0,

        cl_dgt_output_h: 0,
        cl_dgt_output_l: 0,
        tl_dgt_output_l: 0,

        cl_dgt_input_h: 0,
        cl_dgt_input_l: 0,
        tl_dgt_input_l: 0,

        ft_data0: 0,
        ft_data1: 0,
        ft_data2: 0,
        ft_data3: 0,
        ft_data4: 0,
        ft_data5: 0,

        ft_act_status: 0,

        emergency_stop: 0,
        robot_motion_done: 0,
        gripper_motion_done: 0,
    };
}
